import Global from "../global";

const {ccclass, property} = cc._decorator;

@ccclass
export default class Music_ts extends cc.Component {

    @property(cc.AudioClip)
    Audio_turnStart:cc.AudioClip = null; //回合开始

    @property(cc.AudioClip)
    Audio_skillUnlock:cc.AudioClip = null; //技能解锁
    @property(cc.AudioClip)
    Audio_skillUsed:cc.AudioClip = null; //技能使用
    @property(cc.AudioClip)
    Audio_skillBroken:cc.AudioClip = null; //技能使用
    @property(cc.AudioClip)
    Audio_button:cc.AudioClip = null;   //点击按钮
    @property(cc.AudioClip)
    Audio_small:cc.AudioClip = null;    //小子出生
    @property(cc.AudioClip)
    Audio_born:cc.AudioClip = null;     //大子出生
    @property(cc.AudioClip)
    Audio_die:cc.AudioClip = null;      //大子死亡
    @property(cc.AudioClip)
    Audio_attack:cc.AudioClip = null;   //大子攻击
    @property(cc.AudioClip)
    Audio_move:cc.AudioClip = null;     //大子移动
    @property(cc.AudioClip)
    Audio_evolution:cc.AudioClip = null;//大子转型
    @property(cc.AudioClip)
    Audio_battery:cc.AudioClip = null;  //炮台攻击
    @property(cc.AudioClip)
    Audio_ghost:cc.AudioClip = null;    //幽灵移动
    @property(cc.AudioClip)
    Audio_kobold:cc.AudioClip = null;   //地灵施法
    @property(cc.AudioClip)
    Audio_boneBoom:cc.AudioClip = null; //顽石自爆
    @property(cc.AudioClip)
    Audio_moveBBSL:cc.AudioClip = null; //步步生莲的移动
    

    onLoad () {
		Global.music_ts = this;
        cc.audioEngine.setMusicVolume(.2);
        cc.audioEngine.setEffectsVolume(.2);
	}

    /**
     * 播放音效
     */
    playEffect(s:string){
        cc.audioEngine.playEffect(this[s],false);
    }

}
